# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 19:21
# @Author  : feng
# @Email   : feng@163.com
# @File    : scsj_page.py
# @Software: PyCharm
from selenium.webdriver.common.by import By
from pages.login_page import LoginPage
from pages.base_page import BasePage

class ScsjPage(BasePage):
    '''进入商机页面'''
    url='http://192.168.1.5:8081/crm/index.php?m=business'
    '''定位器'''

    sj_locator=(By.LINK_TEXT,'商机')

    dj_locator=(By.NAME,'business_id[]')

    xzsc_locator=(By.XPATH,'//*[@id="delete"]')


    def click_sj(self):
        self.driver.find_element(*self.sj_locator).click()  #切换到商机页面

    def click_dj(self):
        self.driver.find_element(*self.dj_locator).click() #选择删除的用户
    def click_xzsc(self):
        self.driver.find_element(*self.xzsc_locator).click()  #点击删除
    def alert_accept(self):
        self.driver.switch_to.alert.accept()  #弹框确认